/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tetris.model.blokken;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author batist
 */
public class Veld implements Cloneable{
    
    private EnkelBlok blok;
    private boolean bezet;
    
    public Veld(){
        this(null);
    }
    
    public Veld(EnkelBlok blok){
        setBlok(blok);
    }

    public boolean isBezet() {
        return bezet;
    }

    public void setBlok(EnkelBlok blok) {
        this.blok = blok;
        if(blok == null)
            bezet = false;
        else 
            bezet = true;
    }
    
    public EnkelBlok getBlok() {
        return blok;
    }
    
    public void clear(){
        this.blok = null;
        bezet = false;
    }   

    @Override
    public Veld clone(){
        Veld veld = new Veld();
        try {
            veld = (Veld) super.clone();
        } catch (CloneNotSupportedException ex) {
            Logger.getLogger(Veld.class.getName()).log(Level.SEVERE, null, ex);
        }
        return veld;
    }

}
